//调试lodash中的函数组合flowRight
const _ = require('lodash')
//NEVER SAY DIE  =>  never-say-die
//1.切割字符串成数组，2.转换成小写字母，3.链接字符串
const log = _.curry((tag, v) => {
    console.log(tag, v);
    return v
})
//_.split()
const split = _.curry((sep, str) => _.split(str, sep))
//_.toLower 转换成小写字符串
//_.join()
const jion = _.curry((sep, array) => _.join(array, sep))
//_.map()
const map = _.curry((fn, array) => _.map(array, fn))
const f = _.flowRight( jion('-'), log('map'), map(_.toLower), log('split'), split(' '))
console.log(f('NEVER SAY DIE'))


